﻿<%@ Control Language="C#" AutoEventWireup="true" CodeBehind="Quangcaotraitrangcon.ascx.cs" Inherits="WebHousingInfo.Controls.Quangcaotraitrangcon" %>

<div id="banner_ad_240">
    <% var LocalDetail = GetLocal();
       if (LocalDetail != null)
       {
           foreach (var detai in LocalDetail)
           {
               if (detai.IsActive == true && detai.NewsHouseID != null)
               {
                   var ObNews = HousingInfo.Library.NewsHouseBO.GetNewsHouseBO(Convert.ToInt32(detai.NewsHouseID));
                   if (ObNews.IsActive == true && ObNews.ExpireDate >= DateTime.Now && ObNews.IsAdvertisement == true && ObNews.UrlImageAdversitement != "")
                   {
                       if (HousingInfo.Library.VipHouseBOList.KiemtraTinVip_TonTai_ConHanDang_ViTriTren(ObNews.NewsHouseID) == true)
                       {
                           if (ObNews.UrlImageAdversitement != "")
                           {
                               if (checkurlimage(ObNews.UrlImageAdversitement) == true)
                               {
                                   string url = "TotalUpload/ImagesTotal/" + ObNews.UrlImageAdversitement;                                                                                        
                             %>
                             <a href="TinNhaDatChiTiet.aspx?id=<%=ObNews.NewsHouseID %>"><img src="<%=url %>" width="240px" alt="anh quang cao" height="250px" border="1" style="border:1px solid Gray; margin-bottom:3px;" align="left" /></a>
                             <% }
                           }
                       }
                   }
               }
           }
       }%> 
       <a href="HuongDanDangTin.aspx"><img src="Images/raovat.jpg" width="240px" alt="anh quang cao" height="250px" border="1" style="border:1px solid Gray; margin-bottom:3px;" align="left" /></a>
</div>